<?php namespace Phpcmf\Controllers;

class Home extends \Phpcmf\App {


    public function index() {

        $rt = [];
        $data = \Phpcmf\Service::M('app')->get_config(APP_DIR);
        foreach ($data['banner']['file'] as $i => $t) {
            $rt[] = [
                'title' => $data['banner']['title'][$i],
                'url' => dr_get_file($t),
            ];
        }

        $data['banner'] = $rt;
        $data['seo'] = \Phpcmf\Service::L('Seo')->index();

        $this->_json(1, 'ok', $data);
    }



}